<?php

namespace App\Service\Moment\v1_1_8;

use App\Model\MomentLike;
use App\Service\BaseService;

/**
 * 动态点赞列表
 */
class MomentLikeListService extends BaseService
{
    public function handle()
    {
        $momentId = $this->request->input('moment_id', 0);
        $data = MomentLike::getList($momentId);
        $ret['like_num'] = count($data);
        foreach ($data as $item) {
            $ret['list'][] = MomentLike::buildItem($item);
        }
        return $ret;
    }
}
